<template>
  <div class="study-plan">
    <div class="list">
      <div class="item" v-for="item in playList" :key="item.classId">
        <div class="title">{{ item.className }}</div>
        <div class="btn0 btn" v-if="item.status == 0">未解锁</div>
        <div class="btn1 btn" @click="handSta(item)" v-if="item.status == 1">
          点击解锁
        </div>
        <div class="btn2 btn" @click="handSta(item)" v-if="item.status == 2">
          {{ titleOne }}
        </div>
        <div class="btn3 btn" @click="handSta(item)" v-if="item.status == 3">
          学习已完成
        </div>
      </div>
    </div>
    <div class="explain-title">学习说明</div>
    <div class="explain-cont">
      1.开启学习后，可以开始学习。 2.上一节课程学完成后，下一节课才可解锁。
      3.所有课程均学完成后，可申请结业证书。
      4.结业证书包含电子版和纸制版。电子版可在网站查询，纸制版将邮寄至预留地址。
    </div>
  </div>
</template>

<script>
export default {
  name: "ActivityList",
  props: {
    playList: {
      type: Array,
      default: () => []
    },
    titleOne: {
      type: String,
      default: "立即学习"
    }
  },
  components: {},
  data() {
    return {};
  },
  methods: {
    handSta(item) {
      this.$emit("handSta", item);
    }
  },
  mounted() {}
};
</script>

<style lang="scss">
@import "@/assets/css/base";
.study-plan {
  .explain-title {
    color: #333;
    font-size: px2rem(30);
    font-weight: bold;
    margin-bottom: 10px;
  }
  .explain-cont {
    color: #666;
    font-size: px2rem(26);
    line-height: 22px;
  }
  .list {
    .item {
      display: flex;
      align-items: center;
      width: 100%;
      justify-content: space-between;
      border-bottom: 1px dashed #d8d8d8;
      padding-bottom: px2rem(30);
      margin-bottom: px2rem(30);
      .title {
        color: #333;
        font-size: px2rem(30);
      }
      .btn {
        font-size: px2rem(26);
        color: #0050a5;
      }
      .btn0 {
        color: #999999;
        font-size: 14px;
      }
      .btn1 {
        color: #0050a5;
        font-size: 14px;
      }
      .btn2 {
        color: #0050a5;
        font-size: 14px;
      }
      .btn3 {
        color: #0050a5;
        font-size: 14px;
      }
    }
  }
}
</style>
